<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>SearchFlightSC1TC2</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">SearchFlightSC1TC2</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Scenario 1: Avaliable Flights Displayed-->
<!--Test Case 2: Search using filter-->
<!---->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<!--Check if there is a search flight button-->
<tr>
	<td>assertElementPresent</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<!--Click Seach Flight Button-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<!--Check if we are on the right page-->
<tr>
	<td>assertTitle</td>
	<td>Search Flight</td>
	<td></td>
</tr>
<!--Check if there is a buttong called "Search"-->
<tr>
	<td>assertTextPresent</td>
	<td>Search</td>
	<td></td>
</tr>
<!--Search Filter using "Leaving from:"-->
<tr>
	<td>type</td>
	<td>name=leaving</td>
	<td>Vancouver</td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1000 2012-10-09 13:00 2012-10-09 17:00 Air Canada Vancouver Los Angeles 200.0 122</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]</td>
	<td>1003 2012-12-25 16:00 2012-12-26 11:00 Air Canada Vancouver London 200.0 122</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[3]</td>
	<td>1004 2012-12-12 17:00 2012-12-12 19:00 Air Canada Vancouver Edmonton 200.0 122</td>
</tr>
<!--Repeat for "Arrving At"-->
<tr>
	<td>type</td>
	<td>name=arriving</td>
	<td>Edmonton</td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1004 2012-12-12 17:00 2012-12-12 19:00 Air Canada Vancouver Edmonton 200.0 122</td>
</tr>
<!--Repeat for "Date"-->
<tr>
	<td>click</td>
	<td>id=datepicker</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.ui-icon.ui-icon-circle-triangle-e</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=12</td>
	<td></td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1002 2012-12-12 14:00 2012-12-12 15:00 Air Canada Williams Lake Vancouver 200.0 121</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]</td>
	<td>1004 2012-12-12 17:00 2012-12-12 19:00 Air Canada Vancouver Edmonton 200.0 122</td>
</tr>
<!--Try filling in everything-->
<tr>
	<td>type</td>
	<td>name=leaving</td>
	<td>Vancouver</td>
</tr>
<tr>
	<td>type</td>
	<td>name=arriving</td>
	<td>Los Angeles</td>
</tr>
<tr>
	<td>click</td>
	<td>id=datepicker</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.ui-icon.ui-icon-circle-triangle-w</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=9</td>
	<td></td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1000 2012-10-09 13:00 2012-10-09 17:00 Air Canada Vancouver Los Angeles 200.0 122</td>
</tr>
<!--Try filling in departure location and arrival location-->
<tr>
	<td>type</td>
	<td>name=leaving</td>
	<td>Vancouver</td>
</tr>
<tr>
	<td>type</td>
	<td>name=arriving</td>
	<td>Edmonton</td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1004 2012-12-12 17:00 2012-12-12 19:00 Air Canada Vancouver Edmonton 200.0 122</td>
</tr>
<!--Try filling in departure location and Date-->
<tr>
	<td>type</td>
	<td>name=leaving</td>
	<td>Los Angeles</td>
</tr>
<tr>
	<td>click</td>
	<td>id=datepicker</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.ui-icon.ui-icon-circle-triangle-w</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=10</td>
	<td></td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1001 2012-10-10 14:00 2012-10-09 18:00 Air Canada Los Angeles Vancouver 200.0 121</td>
</tr>
<!--Try filling in arrival and date-->
<tr>
	<td>type</td>
	<td>name=arriving</td>
	<td>Los Angeles</td>
</tr>
<tr>
	<td>click</td>
	<td>id=datepicker</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>css=span.ui-icon.ui-icon-circle-triangle-w</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>link=9</td>
	<td></td>
</tr>
<!--Click Search-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we get something-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr</td>
	<td>1000 2012-10-09 13:00 2012-10-09 17:00 Air Canada Vancouver Los Angeles 200.0 122</td>
</tr>
</tbody></table>
</body>
</html>
